package com.ruoyi.project.park.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.park.mapper.BizEntryRecordMapper;
import com.ruoyi.project.park.domain.BizEntryRecord;
import com.ruoyi.project.park.service.IBizEntryRecordService;

/**
 * 停车记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-08
 */
@Service
public class BizEntryRecordServiceImpl implements IBizEntryRecordService 
{
    @Autowired
    private BizEntryRecordMapper bizEntryRecordMapper;

    /**
     * 查询停车记录
     * 
     * @param entryRecordId 停车记录主键
     * @return 停车记录
     */
    @Override
    public BizEntryRecord selectBizEntryRecordByEntryRecordId(String entryRecordId)
    {
        return bizEntryRecordMapper.selectBizEntryRecordByEntryRecordId(entryRecordId);
    }

    /**
     * 查询停车记录列表
     * 
     * @param bizEntryRecord 停车记录
     * @return 停车记录
     */
    @Override
    public List<BizEntryRecord> selectBizEntryRecordList(BizEntryRecord bizEntryRecord)
    {
        return bizEntryRecordMapper.selectBizEntryRecordList(bizEntryRecord);
    }

    /**
     * 新增停车记录
     * 
     * @param bizEntryRecord 停车记录
     * @return 结果
     */
    @Override
    public int insertBizEntryRecord(BizEntryRecord bizEntryRecord)
    {
        bizEntryRecord.setCreateTime(DateUtils.getNowDate());
        return bizEntryRecordMapper.insertBizEntryRecord(bizEntryRecord);
    }

    /**
     * 修改停车记录
     * 
     * @param bizEntryRecord 停车记录
     * @return 结果
     */
    @Override
    public int updateBizEntryRecord(BizEntryRecord bizEntryRecord)
    {
        bizEntryRecord.setUpdateTime(DateUtils.getNowDate());
        return bizEntryRecordMapper.updateBizEntryRecord(bizEntryRecord);
    }

    /**
     * 批量删除停车记录
     * 
     * @param entryRecordIds 需要删除的停车记录主键
     * @return 结果
     */
    @Override
    public int deleteBizEntryRecordByEntryRecordIds(String[] entryRecordIds)
    {
        return bizEntryRecordMapper.deleteBizEntryRecordByEntryRecordIds(entryRecordIds);
    }

    /**
     * 删除停车记录信息
     * 
     * @param entryRecordId 停车记录主键
     * @return 结果
     */
    @Override
    public int deleteBizEntryRecordByEntryRecordId(String entryRecordId)
    {
        return bizEntryRecordMapper.deleteBizEntryRecordByEntryRecordId(entryRecordId);
    }
}
